﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ctrGroupNews.ascx.cs" Inherits="PM.Admin.ctrUser.ctrGroupNews" %>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="detail box">
<div class="bottom_box_content box">
<div class="head_box_content box">
<div class="ct"><p>Danh sách nhóm tin</p></div>
<div class="search">
<asp:TextBox ID="txtSearch" runat="server" CssClass="input_se input_box"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" 
        CssClass="button_box btn_se" onclick="btnSearch_Click"/>
</div>  
<div class="clear"></div>
</div><!--head_box_content box-->

<asp:GridView ID="GridView1" runat="server" CellPadding="4" 
DataKeyNames="id" 
EmptyDataText="không có dữ liệu" 
AllowPaging="True"
PageSize="5"
AutoGenerateColumns="False" 
Width="100%" onpageindexchanging="GridView1_PageIndexChanging" 
onrowdatabound="GridView1_RowDataBound" onrowdeleting="GridView1_RowDeleting" 
EnableTheming="True" ShowHeaderWhenEmpty="True" onrowcommand="GridView1_RowCommand" >
<RowStyle BackColor="#F3F3F3"></RowStyle>
<AlternatingRowStyle BackColor="white"></AlternatingRowStyle>
<EditRowStyle BackColor="#D9EEA2"></EditRowStyle>
<SelectedRowStyle BackColor="#D9EEA2"></SelectedRowStyle>
<Columns>
<asp:TemplateField HeaderText="STT">
<ItemTemplate>
<%#Container.DataItemIndex+1 %>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" ></ItemStyle>
</asp:TemplateField>

<asp:BoundField DataField="Name" HeaderText="Nhóm tin" >
 <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:BoundField>

<asp:TemplateField HeaderText="Hiển thị">
<ItemTemplate>
    <asp:Label ID="Label7" runat="server" Text='<%#Common.PageHelper.ShowActiveStatus(DataBinder.Eval(Container,"DataItem.Active").ToString()) %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
</asp:TemplateField>

<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" CommandArgument='<%# Eval("Id") %>' CommandName="select" runat="server">Chọn</asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
</asp:TemplateField>
          
<asp:CommandField ShowDeleteButton="True" DeleteText="Xóa">
    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:CommandField>           
           
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="cbAll" runat="server" OnCheckedChanged="ChkAll" AutoPostBack="True"/>
</HeaderTemplate>
<ItemTemplate >
<asp:CheckBox ID="cbitem" runat="server"/>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>

</Columns> 
<PagerStyle BackColor="white"></PagerStyle>
</asp:GridView><!--end GridView-->


</div><!--end bottom_box_content box-->
<div class="mtnv">
    <asp:LinkButton ID="btnXN" runat="server" CssClass="btn_mtd" 
        OnClientClick="return confirm('Bạn xóa những dữ liệu này?')" 
        onclick="LinkButton1_Click">Xóa</asp:LinkButton>
        <asp:LinkButton ID="btnRefresh" runat="server" CssClass="btn_mtd" onclick="LinkButton2_Click" >Làm mới</asp:LinkButton>
</div><!--end mtnv-->
</div><!--end detail box-->
<div id="hr_"></div>

    <fieldset >
        <legend>Thao tác dữ liệu</legend>
        <div style="width: 700px;">
        <p>
            <asp:Label ID="lblname" runat="server">Tên nhóm:</asp:Label>
            <asp:TextBox ID="txtName" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>               
        </p>
        <p>
            <asp:Label ID="Label1" runat="server">Meta:</asp:Label>
            <asp:TextBox ID="txtTitle" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>               
        </p>
        <p>
            <asp:Label ID="Label2" runat="server">Mô tả:</asp:Label>
            <asp:TextBox ID="txtDescription" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>               
        </p>
        <p>
            <asp:Label ID="Label3" runat="server">Từ khóa:</asp:Label>
            <asp:TextBox ID="txtKeyword" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>               
        </p>
        <p>
            <asp:Label ID="Label4" runat="server">Thứ tự:</asp:Label>
            <asp:TextBox ID="txtOrd" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>               
        </p>
         <p>
            <asp:Label ID="Label5" runat="server" >Xuất hiện ưu tiên:</asp:Label>
            <div style="margin: -40px 0 0 167px;">
             <asp:RadioButtonList ID="rdbUt" runat="server" RepeatDirection="Horizontal" >
                 <asp:ListItem Value="1">Trang chủ</asp:ListItem>
                 <asp:ListItem Selected="True" Value="0">Bình thường</asp:ListItem>
             </asp:RadioButtonList>
             </div>
         <p>
            <asp:Label ID="Label6" runat="server">Kích hoạt:</asp:Label>
            <div style="margin:-35px 0px 0px 183px;"><asp:CheckBox ID="cbActive" runat="server" CssClass="box_ttdb" /></div>
         
            </div><!--end ttdb-->
    </fieldset>
   
         <p>
             <asp:Button ID="btnSave" runat="server" Text="Lưu lại" CssClass="button_box" 
                 onclick="btnSave_Click"/>
             <asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="button_box" 
                 onclick="btnReset_Click"/>
        </p>
</ContentTemplate>
</asp:UpdatePanel>   